﻿using System;
using System.Linq;

namespace _20.PrintAllDifferrentLettersInString
{
    class PrintAllDifferrentLettersInString
    {
        static void Main(string[] args)
        {
            string text = "Mama mi kupi dens";
            Console.WriteLine(text);
            text = text.ToLower();
            char[] letters = new char[65536];
            for (int i = 0; i < text.Length; i++)
            {
                if (char.IsLetter(text[i]))
                {
                    letters[text[i]]++;
                }
            }
            for (int i = 0; i < letters.Length; i++)
            {
                if (letters[i] > 0 && char.IsLetter((char)i))
                {
                    Console.Write("{0}-{1,-5}", (char)i, (int)letters[i]);
                }
            }
            Console.WriteLine();
        }
    }
 }
